﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="OpenAPI.Model" namespace="OpenAPI.Model.API">

	<class  name="OpenAPI.Model.API.MethodInfo, OpenAPI.Model" table="T_API_METHOD">

		<id name="METHOD_NAME" column="METHOD_NAME" type="String" length="50">
			<generator class="assigned" />
		</id>
		<property name="METHOD_TEXT" column="METHOD_TEXT" type="String" length="200" />
		<property name="METHOD_DESC" type="StringClob">
			<column name="METHOD_DESC" sql-type="NText"></column>
		</property>
		<property name="METHOD_RETURN" type="StringClob" >
			<column name="METHOD_RETURN" sql-type="NText"></column>
		</property>
		<property name="METHOD_ORDER" column="METHOD_ORDER" type="String" length="10" not-null ="true"/>
		<property name="USED_YN" column="USED_YN" type="String" length="1" not-null ="true"/>
		<property name="CATEGORY_CD" column="CATEGORY_CD" type="String" length="50"  not-null ="true"/>

		<bag name="MethodsInConsumerLvl" inverse="true" lazy="true" cascade="all-delete-orphan">
			<key column="METHOD_NAME"/>
			<one-to-many class="OpenAPI.Model.OAuth.MethodInConsumerLevelInfo, OpenAPI.Model"/>
		</bag>

		<bag name="SignArguments" inverse="true" lazy="true" cascade="all-delete-orphan">
			<key column="METHOD_NAME"/>
			<one-to-many class="OpenAPI.Model.API.MethodSignArgumentInfo, OpenAPI.Model"/>
		</bag>

		<bag name="UnSignArguments" inverse="true" lazy="true" cascade="all-delete-orphan">
			<key column="METHOD_NAME"/>
			<one-to-many class="OpenAPI.Model.API.MethodUnSignArgumentInfo, OpenAPI.Model"/>
		</bag>
		
	</class>

</hibernate-mapping>
